/*
    Copyright (c) 2009 Pavol Malosek a.k.a. malo

    This file is part of ComComLib.

    ComComLib is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    ComComLib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __COMMAND_HPP_INCLUDED__
#define __COMMAND_HPP_INCLUDED__

#include <stdint.h>
#include <cstring>

namespace lcc
{
    //  Loggers command list.
    enum logger_command_name_t
    {
        command_empty,               //  No command.
        command_terminate,           //  Terminate I/O thread.
        command_touch,               //  Try to communicate with logger.
        command_read_service_memory, //  Read logger service memory.
        command_read_records,        //  Read records.
        command_start_online_measure,//  Starts online measuring
        command_stop_online_measure
    };

    //  Possible commands status.
    enum logger_command_status_t {
        status_empty,
        status_in_progress,
        status_ok,
        status_failed
    }; 

    //  Structure defines command that can be send to the logger.
    struct logger_command_t
    {
        logger_command_name_t name;
        uint8_t logger_id;
        uint16_t address;
        size_t size;
    };
}
#endif
